package com.tengju.bff.interfaces.covercharge.constant;


public enum CustTaskQueueStatusEnum {

    IS_NOT_RUNN(0,"未运行"),
    EXECUTION_OF(1,"执行中"),
    EXECUTE_SUCCESSFUL(2,"执行成功"),
    ON_FAILURE(3,"执行失败"),
    ;

    private Integer code;
    private String desc;

    CustTaskQueueStatusEnum(Integer code, String desc){
        this.code=code;
        this.desc=desc;
    }
    public Integer getCode(){
        return this.code;
    }
    public String getDesc(){
        return this.desc;
    }

    public static CustTaskQueueStatusEnum getByCode (Integer code){
        for(CustTaskQueueStatusEnum accountTypeEnum : (CustTaskQueueStatusEnum.values())){
            if(accountTypeEnum.getCode().equals(code)){
                return accountTypeEnum;
            }
        }
        return null;
    }
}
